package com.tengju.bff.health;


import com.tengju.bff.interfaces.shared.ApiResponse;
import com.tengju.bff.interfaces.shared.servlet.NotTokenValid;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;


/**
 * @author WenLei 2020年5月13日.
 */
@RestController
@Api(tags = "应用健康检测接口")
@RequestMapping(value = "tengju")
public class HealthCheckController {

    /**
     * 健康心跳检查
     *
     * @return
     * @throws Exception
     */
    @ApiOperation(value = "心跳检测", notes = "心跳检测")
    @RequestMapping(value = "status.ok", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
    @NotTokenValid
    public ApiResponse<String> checkHealth() {
        return ApiResponse.newHealthCheckSuccess(null);
    }

}
